package com.tg.paw.ums.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.tg.paw.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 后台用户登录日志表
 * </p>
 *
 * @author Rubble
 * @since 2020-06-23
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ums_admin_login_log")
@ApiModel(value="AdminLoginLog对象", description="后台用户登录日志表")
public class AdminLoginLog extends BaseEntity {


    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    @TableField("admin_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long adminId;

    @TableField("ip")
    private String ip;

    @TableField("address")
    private String address;

    @ApiModelProperty(value = "浏览器登录类型")
    @TableField("user_agent")
    private String userAgent;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
